import { Service } from "cl-admin";
import BaseService from "@/service/base";
@Service("Wechatrobot")
class Wechatrobot extends BaseService {
	/**
	 * 获取聊天对话人员
	 * @param {string} user_wx
	 * @param {number} user_id
	 */
	getRecordUser(params) {
		return this.$get('/getRecordUser', { params })
	}

	/**
	 * 获取聊天记录列表
	 * @param {string} user_wx
	 * @param {string} cus_wx
	 */
	getRecordList(params) {
		return this.$get('/getRecordList', { params })

	}

	/**
	 * 微信录粉-获取敏感词
	 */
	 getEnsitivewords(params) {
		return this.$get('/getEnsitivewords', { params })
	}

	/**
	 * 微信录粉-敏感词记录列表
	 */
	 getEnsitivelog(params) {
		return this.$get("/ensitivelog", { params }).then(res => {
			return {
				list: res.data,
				pagination: {
					...params,
					size: params.size,
					total: res.total
				}
			};
		});
	}

	/**
	 * 微信录粉-敏感词配置
	 */
	 setEnsitivewordsConfig(params) {
		return this.$post('/ensitivewordsConfig', params)
	}

	/**
	 * 微信录粉-获取敏感词前后50条记录
	 */
	 getSensitiveRecord50(params) {
		return this.$get('/getSensitiveRecord50', {params})
	}
}
export default Wechatrobot
